<template>
	<!-- <view> -->
		<image  @tap="previewImage" :src="url+image" :style="[classstyle]" mode="aspectFill"></image>
	<!-- </view> -->
</template>

<script>
	export default {
		props: [
			'url', 'image', 'index', 'imagelist','classstyle'
		],
		methods: {
			previewImage() {
				uni.previewImage({
					urls: this.imagelist ? this.imagelist.map(image => this.url + image) : [this.url + this.image],
					current: this.index ? this.index : 0
				});
			}
		}
	}
</script>
<style lang="less" scoped>
	// view {
	// 	width: 100%;
	// 	height: 100%;

		// image {
		// 	width: 100%;
		// 	height: 100%;
		// }
	// }
</style>